package com.soladhoc.annonces.client.ui;

import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RichTextArea;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.ViewImpl;

public class AnnonceView extends ViewImpl implements AnnoncePresenter.MyView {

	private final Widget widget;

	public interface Binder extends UiBinder<Widget, AnnonceView> {
	}

	@Inject
	public AnnonceView(final Binder binder) {
		widget = binder.createAndBindUi(this);
	}

	@Override
	public Widget asWidget() {
		return widget;
	}

	@UiField TextBox title;
	@UiField RichTextArea text;
	@UiField Button saveButton;
	@Override
	public void setTitle(String title) {
		this.title.setText(title);
	}

	@Override
	public void setText(String text) {
		this.text.setText(text);
	}

	@Override
	public String getTitle() {
		return title.getTitle();
	}

	@Override
	public String getText() {
		return title.getText();
	}

	@Override
	public Button getSaveButton() {
		return this.saveButton;
	}

	@Override
	public void setError(String text) {
		// TODO Auto-generated method stub
		
	}
}
